import request from '@/utils/request'

// 查询订单详情列表
export function listOrderDetail(query) {
  return request({
    url: '/business/orderDetail/list',
    method: 'get',
    params: query
  })
}

// 查询订单详情详细
export function getOrderDetail(id) {
  return request({
    url: '/business/orderDetail/' + id,
    method: 'get'
  })
}

// 新增订单详情
export function addOrderDetail(data) {
  return request({
    url: '/business/orderDetail',
    method: 'post',
    data: data
  })
}

// 修改订单详情
export function updateOrderDetail(data) {
  return request({
    url: '/business/orderDetail',
    method: 'put',
    data: data
  })
}

// 删除订单详情
export function delOrderDetail(id) {
  return request({
    url: '/business/orderDetail/' + id,
    method: 'delete'
  })
}

// 导出订单详情
export function exportOrderDetail(query) {
  return request({
    url: '/business/orderDetail/export',
    method: 'get',
    params: query
  })
}

//确认完成服务
export function okOrderDetail(data){
  return request({
    url:'/business/orderDetail/ok',
    method:'put',
    data:data
  })
}

//申请退款
export function cancelOrderDetail(data){
  return request({
    url:'/business/orderDetail/cancel',
    method:'put',
    data:data
  })
}

//同意退款申请
export function greenOrderDetail(data){
  return request({
    url:'/business/orderDetail/green',
    method:'put',
    data:data
  })
}